<template>
  <div class="main">
      <ul class="grid">
        <li class="item" v-for="(items,index) in list.data" :key="index">
          <nuxt-link  class="effect-oscar item_content content-lar" :to="{name:'ColinWoo-blog-article-article_id',params:{article_id:items.article_id}}">
            <div class="time"><span>{{items.create_time.substring(0,2)}}</span>{{items.create_time.substring(2)}}<br />{{items.category.name}}</div>
            <img :src="items.image.file_path" :alt="'ColinWoo' + items.article_title" class="img-responsive" />
            <div>
                <h2 class="title" :data-title="items.article_title">{{items.article_title}}</h2>
            </div>
          </nuxt-link>
        </li>
      </ul>
      <div class="tip" v-if="list.data.length < 1">还没有数据,等我什么时候想起来了再补上.</div>
  </div>
</template>

<script>
export default {
  props:['list'],
  created(){
    // this.list = this.$store.state.article.articleList;
  },
  data(){
     return {
     }
  }
}
</script>
<style scoped>

@media screen and (max-width: 1000px) {
  .main{
    height: 100vh;
    display: block;
    width:90%;
    margin:0 auto;
  }
  .grid{
    width: 100%;
    display: block;
    height: 100vh;
  }
  .item {
    -moz-page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    break-inside: avoid;
    width: 100%;
    display: block;
    float: left;
    margin-bottom: 20px;
    -webkit-transform:scale3d(1.0, 1.0, 2);
    transform:scale3d(1.0, 1.0, 2);
  }
}
@media screen and (min-width: 1000px) {
  .main{
    height: 100vh;
    display: inline-block;
    width:70%;
    /* border:solid 1px red; */
    padding-top:30px;
    vertical-align:top;
    margin-left: 50px;
  }
  .grid{
    width: 100%;
    -moz-column-count:3; /* Firefox */
    -webkit-column-count:3; /* Safari 和 Chrome */
    column-count:3;
    -moz-column-gap: 2em;
    -webkit-column-gap: 2em;
    column-gap: 2em;
  }
  .item {
    -moz-page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    break-inside: avoid;
    width: 100%;
    margin:1em 2em;
    display: block;
    float: left;
  }
}
.grid > li > a {
  display: block;
  width: 100%;
  overflow: hidden;
  position: relative;
  background-color: rgba(255,255,255,0.4);
  cursor: pointer;
  max-width: 100%;
  font-size: 0;
}
.grid > li > a > .time{
    text-align: center;
    color: #FFF;
    font-weight: 800;
    font-size: 0.8rem;
    line-height: 18px;
    text-transform: uppercase;
    display: block;
    background-color: #fb5353;
    width: 6rem;
    height: 5rem;
    position: absolute;
    left: 0;
    top: 0;
    padding-top: 1rem;
    z-index: 50;
}
.grid > li > a > .time > span{
  color:#FFF;
  font-size: 2.6rem;
  line-height: 35px;
  display: block;
  font-weight: bold;
}
.grid > li > a > img{
  display: block;
  width: 100%;
  height: auto;
}
.title{
  display: block;
  font-size: 18px;
  line-height: 24px;
  color: #FFF;
  font-weight: 500;
  color: #343434;
  padding-left: 42px;
  padding-top: 33px;
  padding-bottom: 31px;
}
.item:hover .title {
    background-color:#fb5353;
    color:#fff;

  transition-delay: 0s;
  transition-duration: 0.3s;
    -webkit-transform:scale3d(1.0, 1.0, 2);
    transform:scale3d(1.0, 1.0, 2);
}
.item:hover img {

  transition-delay: 0s;
  transition-duration: 0.8s;
    -webkit-transform:scale3d(1.0, 1.08, 2);
    transform:scale3d(1.0, 1.08, 2);
    opacity:.5
}
/* .item:hover .title{
  transition-delay: 0s;
  transition-duration: 0.8s;

  transition-property: all;
  transition-timing-function: ease;
  background-color: #fb5353;
  color: #FFF;
}
.item:hover img{
  transition-delay: 0s;
  transition-duration: 0.8s;
  transition-property: all;
  transition-timing-function: ease;
  -webkit-transform: scale3d(1.08, 1.08, 2);
  transform: scale3d(1.08, 1.08, 2);
  opacity: 0.7;
  color: #FFF
} */

.tip{
  font-size: 30px;
  font-weight: 100;
  padding-bottom: 20px;
  display: inline-block;
  margin:auto;
  width: 60%;
}
</style>
